package edu.whu.rose.clock.kps.algorithm.blinks.binding;

import com.sleepycat.bind.tuple.TupleBinding;
import com.sleepycat.bind.tuple.TupleInput;
import com.sleepycat.bind.tuple.TupleOutput;

import edu.whu.rose.clock.kps.algorithm.blinks.index.BlockVertexKeyword;

public class BlockVertexKeywordBinding extends TupleBinding {

	public Object entryToObject(TupleInput input) {
		int block = input.readInt();
		int vertex = input.readInt();
		String keyword = input.readString();
		return new BlockVertexKeyword(block, vertex, keyword);
	}
	
	public void objectToEntry(Object object, TupleOutput output) {
		BlockVertexKeyword gii = (BlockVertexKeyword)object;
		output.writeInt(gii.getBlock());
		output.writeInt(gii.getVertex());
		output.writeString(gii.getKeyword());
	}


}
